from flask import Flask, jsonify, request

from util.proxy_manager import manager

app = Flask(__name__)


@app.route('/proxy/get')
def get_proxy():
    num = request.args.get('num', 50, int)
    return jsonify(list(manager.get_proxies(num)))


if __name__ == '__main__':
    app.run()
